/*
 * @Author: your name
 * @Date: 2021-01-14 10:36:22
 * @LastEditTime: 2021-01-14 16:31:27
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \carlist\src\store\action\cars.js
 */
import api from "../../api"
import {GET_BRAND_LIST,GET_MAKE_LIST} from "../actionType";


export const getBrandList =()=>{
    return (dispatch) => {
        api.getMasterBrandList().then(res=>{
            dispatch({
                type:GET_BRAND_LIST,
                data:res.data.data
            })
        })
    }
}

export const getMakeListById=(MasterID)=>{
    console.log(MasterID)
    return (dispatch) =>{
        api.getMakeList({MasterID}).then(res=>{
            console.log(res)
            dispatch({
                type:GET_MAKE_LIST,
                data:res.data.data
            })
        })
    }
}